package com.hzspace.welcome;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @Author: LiuHao
 * @Descirption:
 * @Date: 2020/3/2_14:46
 */
@Controller
public class HelloController {

    /**
     * 访问localhost:8080(默认欢迎页访问地址) 会优先访问到static静态目录下的index.html
     * 如果static下没有index.html,才会走"/index" Mapping路径跳转访问templates下的index.html
     * 当然了 访问localhost:8080/index肯定是访问到templates
     * @return
     */
    @GetMapping("/index")
    public Object welcome(){
        return "index";
    }

}
